package example1

import "fmt"

type Pet interface {
	SetName(name string)
	Name() string
	Category() string
}

type Dog struct {
	name string
}

func (dog *Dog) SetName(name string) {
	dog.name = name
}
func (dog *Dog) Name() string {
	return dog.name
}
func (dog *Dog) Category() string {
	return dog.name
}

func main() {
	dog := Dog{"little pig"}
	var pet Pet = &dog
	dog.SetName("monster")
	fmt.Printf("dog: %v\n", dog)
	fmt.Printf("pet: %v\n", pet)
}
